]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
search: Don't expand search when clicking section headers
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 1 Mar 2011 23:15:17 +0000 (00:15 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 2 Mar 2011 22:12:35 +0000 (23:12 +0100)
Currently section headers in the search view are reactive and run
the corresponding provider's expandSearch() function when clicked,
which should launch an external program displaying all search
results for the section. Unfortunately it is only implemented for
the "Settings" provider, and does not work properly (as it ignores
the search and just launches System Settings).
Also current mockups deemphasize the section header, making the
feature pretty much indiscoverable (except by accident when
interfering with swipe-scrolling).
In conclusion, the feature does not make much sense in its current
form, so remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=643632

js/ui/appDisplay.js
js/ui/docDisplay.js
js/ui/search.js
js/ui/searchDisplay.js

index cd5983bf6c22c444b73521eefd306c15d9a734e8..364b637db7064f277b5bd14a1555d19e87854f79 100644 (file)
@@ -294,10 +294,6 @@ AppSearchProvider.prototype = {
         let app = this._appSys.get_app(resultMeta['id']);
         let icon = new AppWellIcon(app);
         return icon.actor;
-    },
-
-    expandSearch: function(terms) {
-        log('TODO expand search');
     }
 };
 
@@ -318,12 +314,6 @@ PrefsSearchProvider.prototype = {
 
     getSubsearchResultSet: function(previousResults, terms) {
         return this._appSys.subsearch(true, previousResults, terms);
-    },
-
-    expandSearch: function(terms) {
-        let controlCenter = this._appSys.load_from_desktop_file('gnomecc.desktop');
-        controlCenter.launch();
-        Main.overview.hide();
     }
 };
 
index 2e77f8c77b9883b20f822073c618ee70349d6da8..85bbdf978e8de3b92274c9f2d60a034028e05602 100644 (file)
@@ -43,9 +43,5 @@ DocSearchProvider.prototype = {
 
     getSubsearchResultSet: function(previousResults, terms) {
         return this._docManager.subsearch(previousResults, terms);
-    },
-
-    expandSearch: function(terms) {
-        log('TODO expand docs search');
     }
 };
index ca35341e9aedae6f3c026c392a5aa80d1f98a5d7..fce5866244840c59af45dd783e35beb7f9c705bf 100644 (file)
@@ -209,17 +209,6 @@ SearchProvider.prototype = {
      */
     activateResult: function(id) {
         throw new Error('Not implemented');
-    },
-
-    /**
-     * expandSearch:
-     *
-     * Called when the user clicks on the header for this
-     * search section.  Should typically launch an external program
-     * displaying search results for that item type.
-     */
-    expandSearch: function(terms) {
-        throw new Error('Not implemented');
     }
 };
 Signals.addSignalMethods(SearchProvider.prototype);
index ae7bce6a82fc6f26de6d634135b189d0deca8a4f..552737ec537e25263ffc4da7baec92397eb3d095 100644 (file)
@@ -243,13 +243,9 @@ SearchResults.prototype = {
     createProviderMeta: function(provider) {
         let providerBox = new St.BoxLayout({ style_class: 'search-section',
                                              vertical: true });
-        let titleButton = new St.Button({ style_class: 'search-section-header',
-                                          reactive: true,
-                                          x_fill: true,
-                                          y_fill: true });
-        titleButton.connect('clicked', Lang.bind(this, function () { this._onHeaderClicked(provider); }));
-        providerBox.add(titleButton);
-        titleButton.set_child(new St.Label({ text: provider.title }));
+        let title = new St.Label({ style_class: 'search-section-header',
+                                   text: provider.title });
+        providerBox.add(title);
 
         let resultDisplayBin = new St.Bin({ style_class: 'search-section-results',
                                             x_fill: true,
@@ -324,10 +320,6 @@ SearchResults.prototype = {
         return true;
     },
 
-    _onHeaderClicked: function(provider) {
-        provider.expandSearch(this._searchSystem.getTerms());
-    },
-
     _modifyActorSelection: function(resultDisplay, up) {
         let success;
         let index = resultDisplay.getSelectionIndex();